import request from '@/utils/request'

export const getPostList = () => request.get('/api/seeker/user/post/getAll')

export const sendPost = ({ userId, title, content }) =>
  request.post('/api/seeker/user/post/post', {
    userId,
    title,
    content
  })

export const SearchPost = (key) =>
  request.post(`/api/seeker/user/post/searchDoc?value=${key}`)

export const DirectUser = ({
  senderName,
  receiverName,
  createTime,
  status,
  receiverHeadImage,
  senderHeadImage
}) =>
  request.post('/api/chat/user/saveChatList', {
    senderName,
    receiverName,
    createTime,
    status,
    receiverHeadImage,
    senderHeadImage
  })
